const fs = require('fs')
const inquirer = require('inquirer')
const chalk = require('chalk')


module.exports = () => {
  inquirer.prompt([{
    type: 'list',
    message: '请输入您接下来的操作:',
    name: 'method',
    choices: [
      "退出",
      "创建新模块",
      "创建新菜单",
      "创建新tabs栏",
    ]
  }]).then(answers => {
    console.log(answers.method)
    if (answers.method == "创建新模块") {
      require('./module.js')()
    }
    if (answers.method == "创建新菜单") {
      require('./menu.js')()
    }
    if (answers.method == "创建新tabs栏") {
      require('./page.js')()
    }
    if (answers.method == "退出") {
      console.log(chalk.bold.blue('退出创建操作'))
    }
  })

}
